<?php
include_once('./base/xcx_sqlclass.php');
include_once('./base/xcx_commonclass.php');
$fun=new commonfun();
$mysql=new MMsql();
$pageNum="1";
$pageSize="10";
$allCount=($pageNum - 1) * $pageSize;
$a="aa222"; 
//$sql="sleect * FROM test WHERE CONCAT_WS('',a1,a2,a3,a4)like '%{$a}%'";
//$sql2="update wk_id_key set maxval = $m where id_type='user_id' and maxval<$m";
//$sqlclear="truncate table  wk_id_key";
// $sql="select * from test
// where a1 = '".$a."' and id >= (select id from test where a1 = '".$a."'  limit $allCount,1 ) 
// limit 0,$pageSize ";
//select * from dual where time>unix_timestamp('2014-04-13') and time <= unix_timestamp('2014-05-13'')
//where time between  now()  and (NOW() - interval 24 hour)
$sql="truncate table  wk_videos";
$re=$mysql->doSql($sql);
echo json_encode($re);








// try{
// 	$mmsql->startTrans();
// 	$result=$mmsql->doSql($sql);
// 	if($result<1)
// 		 throw new PDOException('sql失败'); // 如出现异常提示信息或执行动作
// 	$result=$mmsql->doSql($sql2);
// 	if($result<1)
// 		 throw new PDOException('sql2失败'); // 如出现异常提示信息或执行动作
// 	$result=$mmsql->commit();
// 	echo $result;
// }catch(PDOException $e){
// 	$mmsql->rollback();
// 	echo $e->getMessage();
// }








// for($i=0;$i<100;$i++){
// 	$sql="insert into test(a1,a2) values ('aa222','mm998')";
// 	$result=mysqli_query($link,$sql);
// }
//echo json_encode($row);
//$sql="select * from wk_id_key where Id=2";
// $list=$mmsql->doSql($sql);
// echo json_encode($list)."<br/>";
// echo count($list);

// $data = json_decode(file_get_contents("lock.txt"));
// echo $data;
// $fp= fopen("lock.txt", "w+");

// if(!flock($fp,LOCK_EX | LOCK_NB)){
// echo "系统繁忙，请稍后再试";
// return;
// }


?>